<template>
	<view class="modifyphone">
		<!-- 顶部导航 -->
		<diyNavBar value='实名认证'></diyNavBar>
		<view class="modify-item">
			<view class="left">姓名</view>
			<input type="text" v-model="setData.name" placeholder="请输入姓名"/>
		</view>
		<view class="modify-item">
			<view class="left">身份证</view>
			<input type="text" v-model="setData.card" placeholder="请输入身份证"/>
		</view>
		<view class="tips">
			实名认证信息错误会导致无法提现
		</view>
		<button type="default" class="determine" @click="btn">绑定</button>
	</view>
</template>

<script>
	import diyNavBar from '../../component/diy-nav/diy-navbar.vue'
	export default{
		components:{diyNavBar},
		data(){
			return {
				setData:{
					name:'',//姓名
					card:'',//身份证
				},
				judgenum:false,//防止重复提交
			}
		},
		methods:{
			btn(){
				if(this.judgenum) return false;
				this.judgenum = true;
				this.$http.sendrequest('/member/Isauth',this.setData,{
					tokenJudge:true
				}).then(res=>{
					uni.showToast({title:res.msg,icon:'none'});
					this.judgenum = false
					if(res.code == 1){
						setTimeout(()=>{
							uni.navigateBack({delta: 1});
						},1000)
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.modifyphone{
		min-height: 100vh;
		background: $uni-content-background-color;
		.modify-item{
			display: flex;
			align-items: center;
			padding: 0 30rpx;
			box-sizing: border-box;
			height: 120rpx;
			background: #FFFFFF;
			font-size: 28rpx;
			border-bottom: 2rpx solid rgba(0,0,0,.02);
			.left{
				width:140rpx;
				margin-right: 40rpx;
			}
			.text{
				font-size: 28rpx;
				color: #666666 ;
			}
			input{
				width: calc(60% - 120rpx);
				height: 80%;
				text-align: left;
				font-size: 28rpx;
			}
			.code{
				width: 198rpx;
				height: 52rpx;
				text-align: center;
				line-height: 52rpx;
				color: #FFFFFF;
				background: #FF6F30;
				font-size: 24rpx;
				border-radius: 52rpx;
				margin: 0 0 0 24rpx;
			}
		}
		.tips{
			font-size: 24rpx;
			color: rgba(0,0,0,.4);
			margin: 30rpx;
			
		}
		.determine{
			margin: 0 30rpx;
			width: auto;
			background: $uni-tabbar-hovercolor;
			text-align: center;
			line-height: 80rpx;
			font-size: 28rpx;
			color: #FFFFFF;
			margin-top:70rpx;
			border-radius: 80rpx;
		}
	}

</style>
